package com.ithuameng.admin.config;

import com.ithuameng.admin.converter.String2EnumConverterFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * Web 配置（枚举字符串转换）
 * 
 * @author ithuameng
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

	@Override
	public void addFormatters(FormatterRegistry registry) {
		registry.addConverterFactory(new String2EnumConverterFactory());
	}
}
